export enum ErrorCode {
  HTTP_ERROR = 10001, //接口请求错误
  PARAMS_ERROR = 10002, //缺少必填参数
  FlOOR_NOTFOUND = 10003, //未找到楼层
  FlOOR_EMPTY = 10004, //本楼层未绑定地图
  BUILD_EMPTY = 10005, //场馆所有楼层均未绑定地图
}

export const getErrorInfo = (code: ErrorCode) => {
  switch (code) {
    case ErrorCode.HTTP_ERROR:
      return "接口请求错误";

    case ErrorCode.PARAMS_ERROR:
      return "缺少必填参数";

    case ErrorCode.FlOOR_NOTFOUND:
      return "未找到楼层,请检查楼层code是否正确";

    case ErrorCode.FlOOR_EMPTY:
      return "楼层为空";

    case ErrorCode.BUILD_EMPTY:
      return "场馆所有楼层均未绑定地图";

    default:
      return "未知错误";
  }
};
